package com.cloud.api.domain.alarm;

import com.cloud.api.utils.ExcelUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@ExcelUtils.ExcelSheet(watermark = @ExcelUtils.Watermark(type = 0)
)
@Schema(description = "报警明细已处理导出数据")
public class HandleAlarmExcel {

    @Schema(description = "车牌号")
    @ExcelUtils.ExcelExport(name = "table.field.licenseNumber",columnWidth = 18)
    private String licenseNumber;

    @Schema(description = "vin")
    @ExcelUtils.ExcelExport(name = "table.field.vin")
    private String vin;

    @Schema(description = "报警级别")
    @ExcelUtils.ExcelExport(name = "table.field.alarmLevel",kvs = {
            @ExcelUtils.KV(k="1",v="一级"),
            @ExcelUtils.KV(k="2",v="二级"),
            @ExcelUtils.KV(k="3",v="三级")
    })
    private Integer alarmLevel;

    @Schema(description = "报警类型")
    @ExcelUtils.ExcelExport(name = "table.field.alarmType",kvs = {
            @ExcelUtils.KV(k="1",v="温度差异报警"),
            @ExcelUtils.KV(k="2",v="电池高温报警"),
            @ExcelUtils.KV(k="3",v="车载储能装置类型过压报警"),
            @ExcelUtils.KV(k="4",v="车载储能装置类型欠压报警"),
            @ExcelUtils.KV(k="5",v="SOC过低报警"),
            @ExcelUtils.KV(k="6",v="单体电池过压报警"),
            @ExcelUtils.KV(k="7",v="单体电池欠压报警"),
            @ExcelUtils.KV(k="8",v="SOC过高报警"),
            @ExcelUtils.KV(k="9",v="SOC跳变报警"),
            @ExcelUtils.KV(k="10",v="可充电储能系统不匹配报警"),
            @ExcelUtils.KV(k="11",v="单体电池一致性差报警"),
            @ExcelUtils.KV(k="12",v="绝缘报警"),
            @ExcelUtils.KV(k="13",v="DC温度报警"),
            @ExcelUtils.KV(k="14",v="制动系统报警"),
            @ExcelUtils.KV(k="15",v="DC状态报警"),
            @ExcelUtils.KV(k="16",v="驱动电机控制器温度报警"),
            @ExcelUtils.KV(k="17",v="高压互锁报警"),
            @ExcelUtils.KV(k="18",v="驱动电机温度报警"),
            @ExcelUtils.KV(k="19",v="车载储能装置过充报警")
    })
    private String alarmType;

    @Schema(description = "报警位置")
    @ExcelUtils.ExcelExport(name = "table.field.alarmAddress")
    private String alarmAddress;

    @Schema(description = "车辆报警时间")
    @ExcelUtils.ExcelExport(name = "table.field.alarmTime")
    private LocalDateTime alarmTime;

    @Schema(description = "报警处理时间")
    @ExcelUtils.ExcelExport(name = "table.field.resolveTime")
    private LocalDateTime resolveTime;

    @Schema(description = "处理人")
    @ExcelUtils.ExcelExport(name = "table.field.handler")
    private String handler;

    @Schema(description = "电话")
    @ExcelUtils.ExcelExport(name = "table.field.handlePhone")
    private String phoneNumber;

    @Schema(description = "报警原因")
    @ExcelUtils.ExcelExport(name = "table.field.alarmReason")
    private String alarmReason;

    @Schema(description = "建议处理办法")
    @ExcelUtils.ExcelExport(name = "table.field.suggestHandleMethod",columnWidth = 21)
    private String suggestHandleMethod;

    @Schema(description = "备注")
    @ExcelUtils.ExcelExport(name = "table.field.remark")
    private String remark;
}
